/*************************************************************************
 > Filename   : test.c
 > Author     : oneface - one_face@sina.com
 > Company    : 江山如画
 > Time       : 2018-02-27 13:47:54
 ************************************************************************/

#include <stdio.h>
#include "capapi.h"

//dynomic lib include

/* -D 1 -d 0 -r 64000 -c 2 -b 24 -reboot 3 -repeat 5 -time 10 */

int main()
{
	int ret = -1;

	//command wrapper
	command_args cmdargs = {
		.card = 1,
		.device = 0,
		.channels = 2,
		.rate = 64000,
		.bits = 24,
		.period_size = 1024,
		.period_count = 4,
		.repeat = 5,
		.time = 10,
	};

	//command send
	ret = record_work(cmdargs);

	//return ops
	if (ret == -1) {
		printf("record work is failed quit\n");
	} else {
		printf("record work is success over\n");
	}

	return 0;
}
